#include <wiringPi.h>

struct controlDevice
{
    char name[128]; // 设备名称
    int deep_flag;  // 是否需要响蜂鸣器
    int pin;  // 设别引脚
    int pinStatus; // 引脚状态
    int pinMode; // 引脚模式
    int (*deviceInit)(); // 初始化函数
    int (*open)(); // 打开函数
    int (*close)(); // 关闭函数
    int (*clearConfig)(); // 清除内存
    int (*readStatus)(); // 引脚读取函数
    void *(*get)(void *arg); // 输入模式的获取函数指针

    struct controlDevice *Next;
};




struct controlDevice* addLivingRoomToDeviceLink(struct controlDevice*phead);
struct controlDevice* addFloorLightToDeviceLink(struct controlDevice* phead);
struct controlDevice* addFansToDeviceLink(struct controlDevice* phead);
struct controlDevice* addLockToDeviceLink(struct controlDevice* phead);
struct controlDevice* addFireToDeviceLink(struct controlDevice* phead);
struct controlDevice* adddeepToDeviceLink(struct controlDevice* phead);
struct controlDevice* adddht11ToDeviceLink(struct controlDevice* phead);

struct controlDevice* findDeviceByName(char *name,struct controlDevice*phead);

